package prassein.rsm.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;

import prassein.rsm.entity.base.Resume;
import prassein.rsm.service.base.ResumeManager;

public class ShowAction extends ActionSupport {  
    
	private static final long serialVersionUID = -6583037256775882869L;
	private List<Resume> resumes ;  
    private int pageNow = 1 ; //初始化为1,默认从第一页开始显示  
    private int pageSize = 5 ; //每页显示5条记录  
      
    @Autowired
    private ResumeManager resumeManager;  
      
    public List<Resume> getResumes() {  
        return resumes;  
    }  
  
    public void setResumes(List<Resume> resumes) {  
        this.resumes = resumes;  
    }  
      
    public int getPageNow() {  
        return pageNow;  
    }  
  
    public void setPageNow(int pageNow) {  
        this.pageNow = pageNow;  
    }  
  
    public int getPageSize() {  
        return pageSize;  
    }  
  
    public void setPageSize(int pageSize) {  
        this.pageSize = pageSize;  
    }  
  
    public String execute() throws Exception {  
    	resumes = resumeManager.queryByPage(pageSize, pageNow) ;  
        return SUCCESS ;  
    }

	public ResumeManager getResumeManager() {
		return resumeManager;
	}

	public void setResumeManager(ResumeManager resumeManager) {
		this.resumeManager = resumeManager;
	}  
} 
